import {Dialog} from "@antmjs/vantui";

export  const Dialog_ = Dialog.createOnlyDialog()


export default class DialogUtils {
  static showAlert(title: string, content: string, showCancel: boolean, callback?: Function) {
    Dialog_.alert({
      title: title,
      message: content,
      showCancelButton: showCancel,
      confirmButtonColor: '#5677fc',
      confirmButtonText: '确定',
      cancelButtonText: '取消',
      onConfirm: () => {
        if (callback) {
          callback()
        }
     }
    })
  }
}
